<?php
namespace app\index\model;
use think\Model;
class repoter extends Model{
    //model的构造方法
    protected function initialize(){
        parent::initialize();
    }
    //获取最近4条公告
    public function getRecentRepoter(){
        $res=$this->order('NewsID desc')->limit(4)->select();
        return $res;
    }
    //获取分页的公告数据
    public function getRepoterPage(){
        $res=$this->order('NewsID desc')->paginate(15);
        return $res;
    }



} 